package org.projecteboot.compent.core.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author LuoQiang
 * @date 2019/8/30 13:51
 **/
public class UrlUtil {
    public static String urlHash(String url) {
        String md5 = Md5Util.str2MD5(url);
        return md5;
    }

    public static void main(String[] args) {
        Matcher matcher = Pattern.compile("(([a-zA-Z]+)://)?([a-zA-Z0-9/\\._]+)").matcher("https://m.235zw.com/19/19028/");
        if (matcher.matches()) {
            for (int i = 0; i <= matcher.groupCount(); i++) {
                System.out.println(i + "  " + matcher.group(i));
            }
        }
    }
}
